from api_work.settings import *

Manager = ApiManager('demo', 'https://www.baidu.com')

api = Manager('test', '/test', 'get')
api.add_rule(BaseData(type='params', required=True, name='test_api', value_type='str'))
api.add_rule(BaseData(type='headers', required=True, name='test_header', value_type='str'))

api = Manager('test2', '/test2', 'get')
api.add_rule(BaseData(type='params', required=False, name='test_api2', value_type='str'))

if __name__ == '__main__':
    Manager.test.params.test_api = 'asfdasf'
    Manager.test2.params.test_api2 = 'iiiiiiiiiiiiii'
    str(Manager.test)
    print(Manager.test2())
